package com.swt.controller.W_controller;

import com.alibaba.fastjson.JSON;
import com.swt.service.W_service.CourseService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/CourseController")
public class CourseController {
    @Resource
    private CourseService courseService;

    @RequestMapping("/booking")
    @ResponseBody
    public String booking(int page){
        List list=courseService.booking(page);

        return JSON.toJSONString(list);
    }
}
